package org.nlp.lucene.store;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.util.ArrayList;

public class ObjoutputTest {

	public static void main(String[] args) throws IOException {
		ArrayList<byte[]> buffers = new ArrayList<byte[]>();
		BDB bdb = new BDB("d:/bdb","RAMDirectory");
		
		String str="的撒的撒打算发得分";
		
		buffers.add(str.getBytes());
		System.out.println(new String(buffers.get(0)));
		  bdb.putObj("buffers", buffers);		
		  
		  ArrayList<byte[]> DBbuffers = (ArrayList<byte[]>) bdb.getObj("buffers");
		  System.out.println(new String(DBbuffers.get(0)));
		
	}
}
